; * which-key.el (which-key--truncate-description): Untabify.
authorJeremy Bryant <jb@jeremybryant.net>
Sat, 9 Mar 2024 21:59:43 +0000 (21:59 +0000)
committerJustin Burkett <justin@burkett.cc>
Tue, 12 Mar 2024 20:32:22 +0000 (16:32 -0400)
which-key.el

index 985c419f73b7f3107adf345d45a9b2aad4dfabb9..54ec92d2311440248531f1f69b5f4bf1b1a65235 100644 (file)
@@ -1701,20 +1701,20 @@ If KEY contains any \"special keys\" defined in
 (defsubst which-key--truncate-description (desc avl-width)
   "Truncate DESC description to `which-key-max-description-length'."
   (let* ((max which-key-max-description-length)
-        (max (cl-etypecase max
-               (null nil)
-               (integer max)
-               (float (truncate (* max avl-width)))
-               (function (let ((val (funcall max avl-width)))
-                           (if (floatp val) (truncate val) val))))))
+         (max (cl-etypecase max
+                (null nil)
+                (integer max)
+                (float (truncate (* max avl-width)))
+                (function (let ((val (funcall max avl-width)))
+                            (if (floatp val) (truncate val) val))))))
     (if (and max (> (length desc) max))
         (let ((dots (and (not (equal which-key-ellipsis ""))
-                        (which-key--propertize
-                         which-key-ellipsis 'face
-                         (get-text-property (1- (length desc)) 'face desc)))))
-         (if dots
+                         (which-key--propertize
+                          which-key-ellipsis 'face
+                          (get-text-property (1- (length desc)) 'face desc)))))
+          (if dots
               (concat (substring desc 0 (- max (length dots))) dots)
-           (substring desc 0 max)))
+            (substring desc 0 max)))
       desc)))
 
 (defun which-key--highlight-face (description)